getaddrinfo-is-threadsafe
authorDebian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Fri, 4 May 2018 23:12:27 +0000 (00:12 +0100)
committerRyan Tandy <ryan@nardis.ca>
Fri, 4 May 2018 23:12:27 +0000 (00:12 +0100)
commitbd504eca760962654625a3ab0c6d6b379541f5b4
tree273af51f29ce60692d94f9d89750d340d6fea91e
parent3f9465858a017c497a0745e34c445ac898d1c37b
getaddrinfo-is-threadsafe

OpenLDAP upstream conservatively assumes that certain resolver functions
(getaddrinfo, getnameinfo, res_query, dn_expand) are not re-entrant; but we
know that the glibc implementations of these functions are thread-safe, so
we should bypass the use of this mutex.  This fixes a locking problem when
an application uses libldap and libnss-ldap is also used for hosts
resolution.

Closes Debian bug #340601.

Not suitable for forwarding upstream; might be made suitable by adding a
configure-time check for glibc and disabling the mutex only on known
thread-safe implementations.

Gbp-Pq: Name getaddrinfo-is-threadsafe
libraries/libldap/os-ip.c
libraries/libldap/util-int.c